In current data transmission systems, the transmission bandwidth of a speech signal can be compressed with a speech coding technique to increase the capacity of the communication system. Since only about 40% of the content of speech communications include speech, and the other transmission contents are only silence or background noise, a Discontinuous Transmission System (DTX)/Comfortable Noise Generation (CNG) technique has emerged in order to further save the transmission bandwidth.
A method for generating noise based on DTX/CNG in conventional systems includes the following steps:
At an encoding end, an input background noise signal is filtered into two subbands to output a low subband signal and a high subband signal.
The two subband signals are encoded to obtain a narrow band encoding parameter and a high band encoding parameter. The encoding parameters of the two subbands are combined into a non-noise frame. If the current decision of the DTX is “transmit,” the high band encoding parameter and the a narrow band encoding parameter are assembled into a Silence Insertion Descriptor (SID) frame, and then the SID frame is transmitted to a decoding end; otherwise, a NODATA frame without any data is transmitted to the decoding end.
At the decoding end, if the received encoded bitstream includes only an encoding parameter of narrow band, decoding is performed by a decoding way of 729B, where the encoding parameter is used for a first 10 ms frame, and a second 10 ms frame is processed as a NODATA frame.
If there is an encoding parameter of wide band in the received encoded bitstream, where the wide band includes a high band and a narrow band, the decoding process includes the following steps:
If the received frame is a SID frame, a narrow band encoding parameter and a high band encoding parameter are obtained by decoding the SID frame, and a narrow band background noise and a high band background noise are generated according to the narrow band encoding parameter and the high band encoding parameter.
If the received frame is a NODATA frame, a narrow band encoding parameter is obtained by an encoding way of 729B, and a narrow band background noise is obtained by a CNG way of 729B. A high band encoding parameter is the same as the high band encoding parameter of the previous SID frame: PWB=PWB—PRE—SID, and a high band background noise is generated accordingly.
However, in the above technical solution, since the high band encoding parameter of the previous SID frame is directly copied as the high band encoding parameter of the current frame when a NODATA frame is received, the encoding effects of the two SID frames are completely identical. If the encoding parameters of two adjacent SID frames are quite different, the difference between the wide band background noises may be great and a “block” effect in the speech spectrum will be caused, resulting in a breath-like auditory effect on the user, so that user experience is degraded.